On-Line Analytical Processing (OLAP) functions provide the ability to return ranking, row numbering, and aggregate function information as a scalar value in a query result.
An OLAP function specification may include optional window partitioning and optional window ordering. For example, the following illustrates window partitioning and ordering: RANK( ) OVER (PARTITION BY c0, c1 ORDER BY c2, c3). A window partitioning specifies how to split a result set into collections of rows for which the values of some set of columns or expressions are constant. It is a form of row grouping. A window ordering specifies the ordering of rows within a partition.
With existing Relational Database Management Systems (RDBMSs), a row-store engine processes such requests using row at a time processing, verifying on-the-fly whether this row is different from the previous row. That information may then be used to detect partition boundaries for window partitioning and ordering. There is limited reuse of information across window partitioning and ordering.